! Configuration File for keepalived

global_defs {
    router_id {{ node11 }}
}

vrrp_script chk_nginx {
    script "/etc/keepalived/check_port.sh 7443"
    interval 2
    weight -20
}

vrrp_instance VI_1 {
    state MASTER
    interface eth0
    virtual_router_id 251
    priority 100
    advert_int 1
    mcast_src_ip {{ node11 }}
    nopreempt

    authentication {
        auth_type PASS
        auth_pass 11111111
    }

    track_script {
         chk_nginx
    }

    virtual_ipaddress {
        {{ virtual_ipaddress }}
    }
}
